import { Context, Application, EggAppConfig } from 'egg';

// 这里是你自定义的中间件
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default function fooMiddleware(_options: EggAppConfig['uuid'], _app: Application): any {
  return async (_ctx: Context, next: () => Promise<any>) => {
    // const forbidips: string[] = options.forbidips;
    // const clientIP = ctx.request.ip;

    // if (forbidips.indexOf(clientIP) > -1) {
    //   ctx.status = 403;
    //   ctx.body = '您的ip已经被屏蔽';
    // } else {
    await next();
    // }
  };
}
